<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登录页面</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="{{ asset('/dist/admin/bootstrap/css/bootstrap.min.css') }}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="{{ asset('/dist/admin/css/font-awesome.min.css') }}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="{{ asset('/dist/admin/css/ionicons.min.css') }}">
    <!-- Theme style -->
    <link rel="stylesheet" href="{{ asset('/dist/admin/css/AdminLTE.min.css') }}">
    <!-- iCheck -->
    <link rel="stylesheet" href="{{ asset('/dist/admin/plugins/iCheck/square/blue.css') }}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body  style="background-image:url('/dist/admin/images/photo1.png');" class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="{{ url('/admin') }}">后台登录</a>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">
        @if(count($errors) > 0)
            <p class="login-box-msg">
                @if(is_object($errors))
                    @foreach($errors as $error)
                        {{ $error }}
                    @endforeach
                @else
                    {{ $errors }}
                @endif
            </p>
        @endif
        <form action="{{ url('/logTodo') }}" method="post" name="login">
            <div class="form-group has-feedback">
                <td colspan='2'>{{session("info")}}
                    @if (count($errors) > 0)
                        <ul style='font:13px/20px 宋体'>
                            @foreach ($errors->all() as $error)
                                <li>{{$error}} </li>
                            @endforeach
                        </ul>
                    @endif
                </td>
            </div>
            <div class="form-group has-feedback">
                <input type="hidden" name="_token" value="{{$data["_token"] or csrf_token()}}"/>
                <input type="text" name="uname" value="{{$data["uname"] or ''}}" class="form-control" placeholder="用户名">
                <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
            </div>
            <div class="form-group has-feedback">
                <input type="password" name="password" value="{{$data["password"] or ''}}" class="form-control" placeholder="密码">
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            </div>
            <div class="form-group has-feedback">
                <img style="float: right;" align="top" src="{{url("/captcha").'/'.rand()}}"
                     onclick="this.src = this.src.replace(/\d+$/, '')  + Math.random();">
                <input style="width: 210px;" type="text" class="form-control" name="code" maxlength="5" value=""
                       placeholder="验证码">

            </div>
            <div class="row">
                <div class="col-xs-4 pull-right">
                    <button type="submit" class="btn btn-primary btn-block btn-flat">登录</button>
                </div>
                <!-- /.col -->
            </div>
        </form>
    </div>
    <!-- /.login-box-body -->
</div>

<!-- /.login-box -->

<!-- jQuery 2.2.0 -->
<script src="{{ asset('/dist/admin/plugins/jQuery/jQuery-2.2.0.min.js') }}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="{{ asset('/dist/admin/bootstrap/js/bootstrap.min.js') }}"></script>
<!-- iCheck -->
<script src="{{ asset('/dist/admin/plugins/iCheck/icheck.min.js') }}"></script>
<script>
    $(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
    });
</script>
<!-- 表单验证 -->
<script src="{{ url('/dist/admin/js/login_index.js') }}"></script>
</body>
</html>
